{
  LW Cmdseq -- LightWave Geometry Services

  This header contains the types and declarations for the Modeler
  CommandSequence class.


  Based on lwcmdseq.h which is:
  Copyright 1999, NewTek, Inc.
}

{
  Copyright 2012, Jameel Halabi

  This unit is part of the BlaiseWave wrapper,
  which is licensed under the BSD 2-Clause license (see licenses/license.txt).
}

unit LW_CmdSeq;

{$mode objfpc}{$H+}

interface

uses
  LW_Dyna    ,
  LW_Types   ,
  LW_Modeler ,
  LW_Meshedt ;

const
  LWMODCOMMAND_CLASS     =  'CommandSequence' ;
  LWMODCOMMAND_VERSION   =  3 ;

  CSERR_NONE       =    0 ;
  CSERR_MEMORY     =    1 ;
  CSERR_IO         =    2 ;
  CSERR_USERABORT  =    4 ;
  CSERR_ARGCOUNT   = 2901 ;
  CSERR_ARGTYPE    = 2902 ;
  CSERR_ARGVALUE   = 2903 ;
  CSERR_OPFAILURE  = 2904 ;
  CSERR_BADSEL     = 2905 ;

type

  PLWModCommand = ^TLWModCommand;
  TLWModCommand = record
    Data      : Pointer ;
    Argument  : PChar   ; // const
    Lookup    : function
                (       Data    : Pointer ;
                 const  CmdName : PChar   ) : TLWCommandCode ;
    Execute   : function
                (       Data      : Pointer        ;
                        Cmd       : TLWCommandCode ;
                        Argc      : Integer        ;
                 const  Argv      : PDynaValue     ;
                        Selection : TEltOpSelect   ;
                        Result    : PDynaValue     ) : Integer ;
    EditBegin  : TMeshEditBegin ;
    Evaluate   : function
                 (      Data      : Pointer        ;
                  const Command   : PChar          ) : Integer;

    UndoGroupBegin : procedure
                     ( const Void                  ) ;
    UndoGroupEnd   : procedure
                     ( const Void                  ) ;

    EditBegin2     : TMeshEditBegin2 ;
  end;

implementation

end.

